import request from '@/utils/request'

const PATH = '/sys/user'

export function pageUserREQ(params) {
  return request({
    url: PATH,
    method: 'get',
    params
  })
}

export function createUserREQ(data) {
  return request({
    url: PATH,
    method: 'post',
    data
  })
}
export function getUserByIdREQ(id) {
  return request({
    url: `${PATH}/${id}`,
    method: 'GET'
  })
}

export function updateUserREQ(data) {
  return request({
    url: PATH,
    method: 'put',
    data
  })
}

export function deleteUserREQ(id) {
  return request({
    url: `${PATH}/${id}`,
    method: 'delete'
  })
}

